﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ProjectDirector.ViewModels.EmployeeViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    EditAddress
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">   
    <table width="100%">
   <tr>
   <td width="55px"><img src="../../Content/Images/bigimgs/240.png" width="50px" height="50px" /></td><td>
    <span style="font-size:14px; font-weight:bold;">Edit Address Details for: <%: Model.Employee.FirstName %> <%: Model.Employee.LastName %></span>
   </td><td></td></tr>
   </table>
    <hr style="border-width: 1px;" />
    <script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>" type="text/javascript"></script>
    <% Html.BeginForm(); %>
    <%: Html.ValidationSummary(true, "Edit details was unsuccessful. Please correct the errors and try again.") %>
    <%: Html.HiddenFor(m=>m.Employee.UserId) %>
    <%: Html.HiddenFor(m=>m.Address.AddressId) %>
    <table>
        <tr>
            <td style="width: 163px">
                <%: Html.LabelFor(m => m.Address.Address1) %>
            </td>
            <td>
                <%: Html.TextBoxFor(m => m.Address.Address1, new { @class = "TextBox" })%>
            </td>
        </tr>
        <tr>
            <td style="width: 163px">
                <%: Html.LabelFor(m => m.Address.Address2) %>
            </td>
            <td>
                <%: Html.TextBoxFor(m => m.Address.Address2, new { @class = "TextBox" })%>
            </td>
        </tr>
        <tr>
            <td style="width: 163px">
                <%: Html.LabelFor(m => m.Address.Town) %>
            </td>
            <td>
                <%: Html.TextBoxFor(m => m.Address.Town, new { @class = "TextBox" })%>
            </td>
        </tr>
        <tr>
            <td style="width: 163px">
                <%: Html.LabelFor(m => m.Address.PostalCode) %>
            </td>
            <td>
                <%: Html.TextBoxFor(m => m.Address.PostalCode, new { @class = "SmallTextBox" })%>
            </td>
        </tr>
        <tr>
            <td style="width: 163px">
                <%: Html.LabelFor(m => m.Address.CountryId) %>
            </td>
            <td>
                <%:Html.DropDownListFor(m => m.Address.CountryId, new SelectList(Model.Countries, "CountryId", "CountryName"), new { @class = "TextBox" })%>
            </td>
        </tr>
    </table>
    <p>
    <hr style="border-width: 1px;" />
        <input type="submit" value="Save Changes" class="Button" />
    </p>
    <% Html.EndForm(); %>
    <div>
        <%: Html.ActionLink("Back to List", "List") %>
    </div>
</asp:Content>
